package com.lh.item.api;

import com.lh.item.pojo.CategoryDo;
import com.lh.item.pojo.SpuDo;
import org.springframework.http.ResponseEntity;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 商品相关api，用于开放给外部module使用
 *
 * @author liuhe
 * @date 2020/06/24
 */
@RequestMapping("category")
public interface CategoryApi {

    @GetMapping("list")
    List<CategoryDo> queryCategoriesByPid(@RequestParam("pid") Long pid);


    /**
     * 根据id，查询分类名称
     *
     * @param ids
     * @return
     */
    @GetMapping("names")
    List<String> queryNameByIds(@RequestParam("ids") List<Long> ids);
}
